package com.zyx.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Auto extends AutoQuery{
    private Integer autoId;

    private String autoName;

    private Integer price;

    private String ran;

    private String energy;

    private String model;

    private String firm;


    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date timeMarket;

    private String engine;

    private String power;

    private String gearbox;

    private String measure;

    private String bodyStuc;

    private Integer km;

    private String term;

    private Integer used = 0;

    private Integer utilityTime;

    private Integer mileage;

    private String picture;

    @Override
    public String toString() {
        return "Auto{" +
                "autoId=" + autoId +
                ", autoName='" + autoName + '\'' +
                ", price=" + price +
                ", ran='" + ran + '\'' +
                ", energy='" + energy + '\'' +
                ", model='" + model + '\'' +
                ", firm='" + firm + '\'' +
                ", timeMarket=" + timeMarket +
                ", engine='" + engine + '\'' +
                ", power='" + power + '\'' +
                ", gearbox='" + gearbox + '\'' +
                ", measure='" + measure + '\'' +
                ", bodyStuc='" + bodyStuc + '\'' +
                ", km=" + km +
                ", term='" + term + '\'' +
                ", used=" + used +
                ", utilityTime=" + utilityTime +
                ", mileage=" + mileage +
                ", picture='" + picture + '\'' +
                '}';
    }

    public Integer getAutoId() {
        return autoId;
    }

    public void setAutoId(Integer autoId) {
        this.autoId = autoId;
    }

    public String getAutoName() {
        return autoName;
    }

    public void setAutoName(String autoName) {
        this.autoName = autoName == null ? null : autoName.trim();
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getRan() {
        return ran;
    }

    public void setRan(String ran) {
        this.ran = ran == null ? null : ran.trim();
    }

    public String getEnergy() {
        return energy;
    }

    public void setEnergy(String energy) {
        this.energy = energy == null ? null : energy.trim();
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model == null ? null : model.trim();
    }

    public String getFirm() {
        return firm;
    }

    public void setFirm(String firm) {
        this.firm = firm == null ? null : firm.trim();
    }

    public Date getTimeMarket() {
        return timeMarket;
    }

    public void setTimeMarket(Date timeMarket) {
        this.timeMarket = timeMarket;
    }

    public String getEngine() {
        return engine;
    }

    public void setEngine(String engine) {
        this.engine = engine == null ? null : engine.trim();
    }

    public String getPower() {
        return power;
    }

    public void setPower(String power) {
        this.power = power == null ? null : power.trim();
    }

    public String getGearbox() {
        return gearbox;
    }

    public void setGearbox(String gearbox) {
        this.gearbox = gearbox == null ? null : gearbox.trim();
    }

    public String getMeasure() {
        return measure;
    }

    public void setMeasure(String measure) {
        this.measure = measure == null ? null : measure.trim();
    }

    public String getBodyStuc() {
        return bodyStuc;
    }

    public void setBodyStuc(String bodyStuc) {
        this.bodyStuc = bodyStuc == null ? null : bodyStuc.trim();
    }

    public Integer getKm() {
        return km;
    }

    public void setKm(Integer km) {
        this.km = km;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term == null ? null : term.trim();
    }

    public Integer getUsed() {
        return used;
    }

    public void setUsed(Integer used) {
        this.used = used;
    }

    public Integer getUtilityTime() {
        return utilityTime;
    }

    public void setUtilityTime(Integer utilityTime) {
        this.utilityTime = utilityTime;
    }

    public Integer getMileage() {
        return mileage;
    }

    public void setMileage(Integer mileage) {
        this.mileage = mileage;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture == null ? null : picture.trim();
    }
}